<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    new Promise((resolve,reject) => {
      setTimeout(()=>{
        if (false){
          console.log('执行完成');
          resolve('hello world')
        }else {
          console.log('执行失败');
          reject('zhixin shibai')
        }
      },1000)
    }).then((data)=>{
      console.log(data);},(data)=>{console.log(data)})
</script>
</body>
</html>
